﻿using System.Windows.Forms;

namespace NUnitGenAddIn.Core
{
    /// <summary>
    /// Form to show progress
    /// </summary>
    public partial class ProgressForm : Form
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="ProgressForm"/> class.
        /// </summary>
        public ProgressForm()
        {
            InitializeComponent();
            progressBar.Minimum = 1;            
            progressBar.Step = 1;
            progressBar.Value = 1;
        }

        /// <summary>
        /// Gets or sets the maximum.
        /// </summary>
        /// <value>The maximum.</value>
        public int Maximum
        {
            get
            {
                return progressBar.Maximum;
            }
            set
            {
                progressBar.Maximum = value;
            }
        }

        /// <summary>
        /// Performs the progress step.
        /// </summary>
        public void PerformStep()
        {
            progressBar.PerformStep();
        }

        /// <summary>
        /// Resets the progress bar.
        /// </summary>
        public void Reset()
        {
            progressBar.Value = 1;
        }
    }
}
